package com.sm.li.common.valid.anno;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

//从多个取值中选取一个
@Target(FIELD)
@Retention(RUNTIME)
//指定使用的处理器
@Constraint(
        validatedBy = {RegularHandler.class}
)
public @interface Regular {

    String message() default "{javax.validation.constraints.NotNull.message}";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    int [] values() default {};//自定义属性
}
